// component/message/message.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    title: {
      type: String,
      value: ''
    },
    info: {
      type: Array,
      value: []
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    modelHidden: true,
    animationData: {},
  },

  /**
   * 组件的方法列表
   */
  methods: {
    orderLogistics: function() {
      let that = this;
      that.setData({
        modelHidden: false
      }, () => {
        let animation = wx.createAnimation({
          duration: 500,
          timingFunction: 'ease'
        })
        that.animation = animation
        setTimeout(function() {
          that.big();
        }, 200)
      })
    },
    hideModel: function() {
      let that = this;
      that.setData({
        modelHidden: true
      }, () => {
        let animation = wx.createAnimation({
          duration: 500,
          timingFunction: 'ease'
        })
        that.animation = animation
        setTimeout(function() {
          that.small();
        }, 200)
      })
    },
    big: function() {
      let that = this;
      that.animation.scale(1).step()
      that.setData({
        animationData: that.animation.export()
      })
    },
    small: function() {
      let that = this;
      that.animation.scale(0).step()
      that.setData({
        animationData: that.animation.export()
      })
    },
  }
})